<?php 
//session_start();
ob_start();
include_once('connection/connection.php');
include_once('header.php');
include_once('menu.php');
//$arrHabSource = $_SESSION['arrSource'];
//$arrHabCode=$_SESSION['arrSourceHabit'];



?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<link href="css/style_question.css" type="text/css" rel="stylesheet" />
<script language="Javascript" type="text/javascript" src="js/ajaxFunction_q2.js"></script>
<script language="javascript" type="text/javascript" src="js/validate2.js"></script>
<script language=javascript>
function show_NF(val,i)
{
	//for(i=1; i<=total; i++)
	//{ 
		if(val == "NOT FUNCTIONAL" )
		{
			document.getElementById('nf'+i).style.display = "block";
			document.getElementById('nonFuncDiv'+i).style.display = "none";
			document.getElementById('opration_status'+i).disabled=true;	
			document.getElementById('quality_status'+i).disabled=true;	
			document.getElementById('yield'+i).disabled=true;
			document.getElementById('seasonal_flunctuation'+i).disabled=true;
			document.getElementById('water_table_fluctuation_min'+i).disabled=true;
			document.getElementById('water_table_fluctuation_max'+i).disabled=true;
			document.getElementById('para_ph'+i).disabled=true;
			document.getElementById('para_tds'+i).disabled=true;
			document.getElementById('para_f'+i).disabled=true;
			document.getElementById('para_cl'+i).disabled=true;
			document.getElementById('para_no3'+i).disabled=true;
			document.getElementById('testing_date'+i).disabled=true;
		}	
		else
		{
			document.getElementById('nf'+i).style.display = "none";
			var chks = document.getElementsByName('repairable_status'+i);
			var hasChecked = false;
			for(var j=0; j<chks.length; j++)
			{
				if(chks[j].checked)
				{
					chks[j].checked=false;
				}
			}
			document.getElementById('remarks'+i).value="";
			document.getElementById('nonFuncDiv'+i).style.display = "block";
			document.getElementById('opration_status'+i).disabled=false;	
			document.getElementById('quality_status'+i).disabled=false;	
			document.getElementById('yield'+i).disabled=false;
			document.getElementById('seasonal_flunctuation'+i).disabled=false;
			document.getElementById('water_table_fluctuation_min'+i).disabled=false;
			document.getElementById('water_table_fluctuation_max'+i).disabled=false;
			document.getElementById('para_ph'+i).disabled=false;
			document.getElementById('para_tds'+i).disabled=false;
			document.getElementById('para_f'+i).disabled=false;
			document.getElementById('para_cl'+i).disabled=false;
			document.getElementById('para_no3'+i).disabled=false;
			document.getElementById('testing_date'+i).disabled=false;
		}
}
</script>
<title>Hand Pump Scheme</title>
</head>
<body>
<?php
if(isset($_POST['submit']))
{
		$fclick = true;
		$q2_id = $_SESSION['q2_id'];
		echo "Total Record:".$loccount=$_POST['loccount'];
		$i=1;
		for($i=1; $i<$loccount; $i++)
		{
			
			$hcode='habitation_code'.$i;
			$hname='habitation_name'.$i;
			$type_mh_oh='type_mh_oh'.$i;
			$hp_sp='hp_sp'.$i;
			$location='location'.$i;
			$latitude='latitude'.$i;
			$longitude='longitude'.$i;
			$function_status='function_status'.$i;
			$opration_status='opration_status'.$i;
			$quality_status='quality_status'.$i;
			$yield='yield'.$i;
			$seasonal_flunctuation='seasonal_flunctuation'.$i;
			$water_table_fluctuation_min='water_table_fluctuation_min'.$i;
			$water_table_fluctuation_max='water_table_fluctuation_max'.$i;
			$para_ph='para_ph'.$i;
			$para_tds='para_tds'.$i;
			$para_f='para_f'.$i;
			$para_cl='para_cl'.$i;
			$para_no3='para_no3'.$i;
			$testing_date='testing_date'.$i;
			$repairable_status='repairable_status'.$i;
			$remarks='remarks'.$i;
			//echo "<br>";
			$hcode=$_POST[$hcode];
			$hname=$_POST[$hname];
			$type_mh_oh=$_POST[$type_mh_oh];
			$hp_sp=$_POST[$hp_sp];
			$location=$_POST[$location];
			$latitude=$_POST[$latitude];
			$longitude=$_POST[$longitude];
			$function_status=$_POST[$function_status];
			$opration_status=$_POST[$opration_status];
			$quality_status=$_POST[$quality_status];
			$yield=$_POST[$yield];
			$seasonal_flunctuation=$_POST[$seasonal_flunctuation];
			$water_table_fluctuation_min=$_POST[$water_table_fluctuation_min];
			$water_table_fluctuation_max=$_POST[$water_table_fluctuation_max];
			$para_ph=$_POST[$para_ph];
			$para_tds=$_POST[$para_tds];
			$para_f=$_POST[$para_f];
			$para_cl=$_POST[$para_cl];
			$para_no3=$_POST[$para_no3];
			$testing_date=$_POST[$testing_date];
			$repairable_status=$_POST[$repairable_status];
			$remarks=$_POST[$remarks];
			
			$qr="INSERT INTO tbl_dtls_q2_hp_status(q2_id,habit_code,habitation_name,type_mh_oh,hp_sp,location,latitude,longitude,functional_status,operational_status,quality_status, yield,seasonal_fluctuation,water_table_min,water_table_max,para_ph,para_tds,para_f,para_cl,para_no3,para_testing_date,last_modify,repairable_status,remark) VALUES ('$q2_id','$hcode','$hname','$type_mh_oh','$hp_sp','$location','$latitude','$longitude','$function_status','$opration_status','$quality_status','$yield', '$seasonal_flunctuation','$water_table_fluctuation_min','$water_table_fluctuation_max','$para_ph','$para_tds','$para_f','$para_cl','$para_no3','$testing_date',NOW(), '$repairable_status','$remarks')"; 
			//echo $qr;
			$res=mysql_query($qr);
			//echo $res;
			
			// Code fro inserting data in new table for keeping track record
			$qr1="INSERT INTO tbl_dtls_q2_hp_status_temp(q2_id,habit_code,habitation_name,type_mh_oh,hp_sp,location,latitude,longitude,functional_status, operational_status,quality_status,yield,seasonal_fluctuation,water_table_min,water_table_max,para_ph,para_tds,para_cl,para_f,para_no3,para_testing_date,last_modify, repairable_status,remark) VALUES ('$q2_id','$hcode','$hname','$type_mh_oh','$hp_sp','$location','$latitude','$longitude','$function_status','$opration_status', '$quality_status','$yield','$seasonal_flunctuation','$water_table_fluctuation_min','$water_table_fluctuation_max','$para_ph','$para_tds','$para_cl','$para_f','$para_no3','$para_testing_date',NOW(),'$repairable_status','$remarks')";
			
			$res1=mysql_query($qr1);
			///////////////
			//$i++;
			}
			

			if($res && $res1)
			{
				header('Location: questionnaire2_3.php');
				
			}
			else
			{
				//echo "query==". $qr;
				echo "Unsuccessfull Insertion";
				
			}
				
}		
else
{
	$fclick = false;
	$flag=0;
	//echo "failed";
}		
?>
<div align="center" style="width:600px;">
<form action="" method="post" enctype="multipart/form-data" name="questionnaire2_2" id="questionnaire2_2" onSubmit="return validate2()">
	<table border="0" width="1200" id="table1" cellspacing="0" cellpadding="0">
		<tr>
			<td width="950" height="30">
				<p align="center">
				<font face="Verdana" style="font-size: 10pt; font-weight: 700" color="#000000">
			Hand Pump Scheme</font>		  	</td>
		</tr>
		<tr>		</tr>
		<tr>
			<td height="18">
				<p align="center">
				<font style="font-size: 8.5pt" face="Arial" color="#000000">Page 2</font></p>			</td>
		</tr>
		
		<tr>
			<td bgcolor="#C5D8EB" height="24"><font color="#006699">&nbsp;
				<span style="font-weight: 700">
				<font face="Arial" style="font-size: 8.5pt">7. Water Source Details</font></span></font>			</td>
		</tr>
		<tr>
			<td>
				<table border="0" width="1420" id="table4" cellpadding="0" bgcolor="#EEEEEE">
					<tr>
						<td colspan="29"><span style="font-size: 4pt">&nbsp;</span></td>
					</tr>
					<tr>
						
						<td bgcolor="#CCCCCC" align="center" >
							<address>
		 			  <font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Habitation Name</font></address></td>
					  <td bgcolor="#CCCCCC" align="center">
							<address>
		 			  <font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Type of MH/OH</font></address></td>
					  		<td bgcolor="#CCCCCC" align="center"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color=                        	"#990000">Type of HP/SP</font></td>
					  		<td bgcolor="#CCCCCC" align="center">
							<address>
					  <font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">&nbsp;&nbsp;Location of HP</font></address></td>
						    <td bgcolor="#CCCCCC" align="center"><address>
					        <font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Latitude</font>						      </addrees></td>
					        <td bgcolor="#CCCCCC" align="center"><address>
					          <font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Longitude</font>
					        </address></td>
				        <td colspan="2" bgcolor="#CCCCCC" align="center">
							<address>
				  			<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Functional Status</font></address>						</td><td colspan="12"><table width="857">
				  			  <tr>
						<td colspan="2" bgcolor="#CCCCCC" align="center" rowspan="2">
							<address>
				  			<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Operational status</font></address>						</td>
						<td colspan="2" bgcolor="#CCCCCC" align="center" rowspan="2">
							<address>
				  			<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Quality Status</font></address></td>
						<td bgcolor="#CCCCCC" align="center" width="82" rowspan="2">
							<address>
				  			<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Yield Status</font></address></td>
						<td bgcolor="#CCCCCC" align="center" width="94" rowspan="2">
							<address>
				  			<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Seasonal Fluctuations in yield</font>
							</address></td>
						<td height="21" colspan="2" align="center" bgcolor="#CCCCCC">
							<address>
				  			<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Water Table Fluctuations (m)</font></address></td>
					    <td width="51" rowspan="2" align="center" bgcolor="#CCCCCC">
							<address>
							<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">pH</font>
							</address></td>
				  			<td width="57" rowspan="2" align="center" bgcolor="#CCCCCC"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">TDS</font></td>
				  			<td width="50" rowspan="2" align="center" bgcolor="#CCCCCC"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">F</font></td>
				  			<td width="55" rowspan="2" align="center" bgcolor="#CCCCCC"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Cl</font></td>
				  			<td width="51" rowspan="2" align="center" bgcolor="#CCCCCC"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">NO3</font></td>
				  			<td width="98" rowspan="2" align="center" bgcolor="#CCCCCC"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Date of Testing </font></td>
				  			</tr>
					<tr>
						<td width="50" height="16" align="center" bgcolor="#CCCCCC">
							<address>
		  			  <font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Min</font></address></td>
						<td width="60" align="center" bgcolor="#CCCCCC"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Max</font></td>
						</tr></table></td></tr>
					<?php
					//$hname=$_SESSION['arr_habit_name'];
					//$hcode=$_SESSION['arr_habit_code'];
					
					$i=1;
					
					$qryGetHabit="select * from tbl_dtls_q2_habit where q2_id=$_SESSION[q2_id] order by habit_code asc";
					//echo $qryGetHabit;
					$recGetHabit=mysql_query($qryGetHabit);
					while($rowGetHabit=mysql_fetch_array($recGetHabit))
					{
						$habit_code=$rowGetHabit['habit_code'];
						$habit_name=$rowGetHabit['habit_name'];
						$type_mh_oh=$rowGetHabit['type_mh_oh'];
						$hp_no=$rowGetHabit['hp_no'];
						$sp_no=$rowGetHabit['sp_no'];
						
						if($hp_no>0)
						{
							for($loop=1;$loop<=$hp_no;$loop++)
							{
						
										?>
					<tr>
						<td width="145" align="center"><input type="text" name="habitation_name<?php echo $i;?>" id="habitation_name<?php echo $i;?>" value="<?php echo $habit_name;?>" size="20" class="txt4"/>
						<input type="text" name="habitation_code<?php echo $i;?>" id="habitation_code<?php echo $i;?>" value="<?php echo  $habit_code; ?>" size="20" class="txt4"/></td>
				      <td width="48" align="center"><input type="text" name="type_mh_oh<?php echo $i;?>" id="type_mh_oh<?php echo $i;?>" value="<?php echo $type_mh_oh;?>" size="2" class="txt_1" readonly/></td>
					    <td width="48" align="center"><input type="text" name="hp_sp<?php echo $i;?>" id="hp_sp<?php echo $i;?>" value="<?php echo "HP";?>" size="2" class="txt_1" readonly/></td>
					    <td width="73" align="center">
		  			  <input type="text" name="location<?php echo $i;?>" id="location<?php echo $i;?>" size="20" class="txt5"></td>
						<td width="70" align="center">
					  <input type="text" name="latitude<?php echo $i;?>" id="latitude<?php echo $i;?>" size="20" class="txt5">						</td>
						<td width="70" align="center">
					  <input type="text" name="longitude<?php echo $i;?>" id="longitude<?php echo $i;?>" size="20" class="txt5">						</td>
						<td width="37" align="center">
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  <input type="radio" name="function_status<?php echo $i;?>" id="function_status<?php echo $i;?>" value="FUNCTIONAL" onClick="show_NF(this.value,<?php echo $i; ?>)" checked="checked">F</font>					  </td>
						<td width="42" align="center">
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  <input type="radio" name="function_status<?php echo $i;?>" id=	                            "function_status<?php echo $i;?>" value="NOT FUNCTIONAL" onClick="show_NF(this.value,<?php echo $i; ?>)">NF</font>					  </td>
						<td width="857" colspan="12" align="center"><div name="nonFuncDiv<?php echo $i; ?>" id="nonFuncDiv<?php echo $i; ?>"><table width="855">
						  <tr><td width="84" align="center">
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  <input type="radio" name="opration_status<?php echo $i;?>" id="opration_status<?php echo $i;?>" value="In Use" checked="checked">IU</font>					  
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  <input type="radio" name="opration_status<?php echo $i;?>" id="opration_status<?php echo $i;?>" value="Out of Use">OU</font>					  </td>
						<td width="76" align="center">
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  <input type="radio" name="quality_status<?php echo $i;?>" id="quality_status<?php echo $i;?>" value="Potable" checked="checked">P</font>					  
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  <input type="radio" name="quality_status<?php echo $i;?>" id="quality_status<?php echo $i;?>" value="Not Potable">NP</font>					  </td>
						<td width="101">
							<p align="center">
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
							<input type="radio" name="yield<?php echo $i;?>" id="yield<?php echo $i;?>" value="Good" checked="checked">G
							<input type="radio" name="yield<?php echo $i;?>" id="yield<?php echo $i;?>" value="Satisfactory">S
	                  <input type="radio" name="yield<?php echo $i;?>" id="yield<?php echo $i;?>" value="Poor">P</font>					  </td>
						<td width="99" align="center">
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
							<input type="radio" name="seasonal_flunctuation<?php echo $i;?>" id="seasonal_flunctuation<?php echo $i;?>" value="No Change" checked="checked">N 
							<input type="radio" name="seasonal_flunctuation<?php echo $i;?>" id="seasonal_flunctuation<?php echo $i;?>" value="Slight Change">S
			  			  <input type="radio" name="seasonal_flunctuation<?php echo $i;?>" id="seasonal_flunctuation<?php echo $i;?>" value="Drastic Change">D</font>					  </td>
						<td width="50" align="center">
		  			  <input type="text" name="water_table_fluctuation_min<?php echo $i;?>" id="water_table_fluctuation_min<?php echo $i;?>" size="20" class="txt6" onBlur="float(this)"></td>
						<td width="54" align="center">
		  			  <input type="text" name="water_table_fluctuation_max<?php echo $i;?>" id="water_table_fluctuation_max<?php echo $i;?>" size="20" class="txt6" onBlur="float(this)"></td>
					    <td width="50" align="center"><input type="text" name="para_ph<?php echo $i;?>" id="para_ph<?php echo $i;?>" size="20" class="txt6" ></td>
					    <td width="50" align="center"><input type="text" name="para_tds<?php echo $i;?>" id="para_tds<?php echo $i;?>" size="20" class="txt6" ></td>
					    <td width="50" align="center"><input type="text" name="para_f<?php echo $i;?>" id="para_f<?php echo $i;?>" size="20" class="txt6" ></td>
					    <td width="50" align="center"><input type="text" name="para_cl<?php echo $i;?>" id="para_cl<?php echo $i;?>" size="20" class="txt6" ></td>
						<td width="50" align="center"><input type="text" name="para_no3<?php echo $i;?>" id="para_no3<?php echo $i;?>" size="20" class="txt6" ></td>
						<td width="50" align="center"><input type="text" name="testing_date<?php echo $i;?>" id="testing_date<?php echo $i;?>" size="20" class="txt6" ></td>
						<td width="35" align="center"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Date</font></td>
						</tr></table></div></td>
			  	  <tr>
					  		<td colspan="14"><div id="nf<?php echo $i;?>" class="hideme" align="center">
							<table border="0" width="15%" id="table16" cellpadding="0">
							<tr>
								<td colspan="3" align="center" bgcolor="#CCCCCC">
									<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Repairable Status</font>								</td>
								<td width="109" rowspan="2" align="center" bgcolor="#CCCCCC"> 
									<font style="font-size: 8.5pt; font-style:normal" face="Verdana" color="#990000">Remarks (State means to repair &amp; rejuvenate)</font></td>
							  <tr>
									<td align="center" width="61" bgcolor="#CCCCCC">
									<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Repairable</font></td>
								<td align="center" width="61" bgcolor="#CCCCCC">
									<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Non Repairable</font>					  			</td>
								<td align="center" width="64" bgcolor="#CCCCCC">
									<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Abandoned</font></td>
							  </tr>
							<tr>
								<td align="center" width="61" bgcolor="#CCCCCC">
									<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  			  <input type="radio" name="repairable_status<?php echo $i;?>" id="repairable_status<?php echo $i;?>" value="Repairable"></font>				  			  </td>
								<td align="center" width="61" bgcolor="#CCCCCC">
									<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  			  <input type="radio" name="repairable_status<?php echo $i;?>" id="repairable_status<?php echo $i;?>" value="Non Repairable"></font>				  			  </td>
								<td align="center" width="64" bgcolor="#CCCCCC">
									<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  			  <input type="radio" name="repairable_status<?php echo $i;?>" id="repairable_status<?php echo $i;?>" value="Abondoned"></font>				  			  </td>
								<td width="109" align="center" bgcolor="#CCCCCC">
		       		  				<input type="text" name="remarks<?php echo $i;?>" id="remarks<?php echo $i;?>" size="40" style="font-size: 8pt; font-family: Verdana" class="txt5">							  </td>
							</tr>
							</table>
							</div></td>
		  		  </tr>
					<?php 
					$i++;
					 } }
					
					/////////////////////////////end of hp code
					if($sp_no>0)
						{
							for($loop=1;$loop<=$sp_no;$loop++)
							{
						
										?>
					<tr>
						<td width="145" align="center"><input type="text" name="habitation_name<?php echo $i;?>" id="habitation_name<?php echo $i;?>" value="<?php echo $habit_name;?>" size="20" class="txt4"/>
						<input type="text" name="habitation_code<?php echo $i;?>" id="habitation_code<?php echo $i;?>" value="<?php echo  $habit_code; ?>" size="20" class="txt4"/></td>
				      <td width="48" align="center"><input type="text" name="type_mh_oh<?php echo $i;?>" id="type_mh_oh<?php echo $i;?>" value="<?php echo $type_mh_oh;?>" size="2" class="txt_1" readonly/></td>
					    <td width="48" align="center"><input type="text" name="hp_sp<?php echo $i;?>" id="hp_sp<?php echo $i;?>" value="<?php echo "SP";?>" size="2" class="txt_1" readonly/></td>
					    <td width="73" align="center">
		  			  <input type="text" name="location<?php echo $i;?>" id="location<?php echo $i;?>" size="20" class="txt5"></td>
						<td width="70" align="center">
					  <input type="text" name="latitude<?php echo $i;?>" id="latitude<?php echo $i;?>" size="20" class="txt5">						</td>
						<td width="70" align="center">
					  <input type="text" name="longitude<?php echo $i;?>" id="longitude<?php echo $i;?>" size="20" class="txt5">						</td>
						<td width="37" align="center">
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  <input type="radio" name="function_status<?php echo $i;?>" id="function_status<?php echo $i;?>" value="FUNCTIONAL" onClick="show_NF(this.value,<?php echo $i; ?>)" checked="checked">F</font>					  </td>
						<td width="42" align="center">
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  <input type="radio" name="function_status<?php echo $i;?>" id=	                            "function_status<?php echo $i;?>" value="NOT FUNCTIONAL" onClick="show_NF(this.value,<?php echo $i; ?>)">NF</font>					  </td>
						<td width="857" colspan="12" align="center"><div name="nonFuncDiv<?php echo $i; ?>" id="nonFuncDiv<?php echo $i; ?>"><table width="855">
						  <tr><td width="84" align="center">
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  <input type="radio" name="opration_status<?php echo $i;?>" id="opration_status<?php echo $i;?>" value="In Use" checked="checked">IU</font>					  
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  <input type="radio" name="opration_status<?php echo $i;?>" id="opration_status<?php echo $i;?>" value="Out of Use">OU</font>					  </td>
						<td width="76" align="center">
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  <input type="radio" name="quality_status<?php echo $i;?>" id="quality_status<?php echo $i;?>" value="Potable" checked="checked">P</font>					  
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  <input type="radio" name="quality_status<?php echo $i;?>" id="quality_status<?php echo $i;?>" value="Not Potable">NP</font>					  </td>
						<td width="101">
							<p align="center">
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
							<input type="radio" name="yield<?php echo $i;?>" id="yield<?php echo $i;?>" value="Good" checked="checked">G
							<input type="radio" name="yield<?php echo $i;?>" id="yield<?php echo $i;?>" value="Satisfactory">S
	                  <input type="radio" name="yield<?php echo $i;?>" id="yield<?php echo $i;?>" value="Poor">P</font>					  </td>
						<td width="99" align="center">
							<font style="font-size: 8.5pt" face="Arial" color="#000000">
							<input type="radio" name="seasonal_flunctuation<?php echo $i;?>" id="seasonal_flunctuation<?php echo $i;?>" value="No Change" checked="checked">N 
							<input type="radio" name="seasonal_flunctuation<?php echo $i;?>" id="seasonal_flunctuation<?php echo $i;?>" value="Slight Change">S
			  			  <input type="radio" name="seasonal_flunctuation<?php echo $i;?>" id="seasonal_flunctuation<?php echo $i;?>" value="Drastic Change">D</font>					  </td>
						<td width="50" align="center">
		  			  <input type="text" name="water_table_fluctuation_min<?php echo $i;?>" id="water_table_fluctuation_min<?php echo $i;?>" size="20" class="txt6" onBlur="float(this)"></td>
						<td width="54" align="center">
		  			  <input type="text" name="water_table_fluctuation_max<?php echo $i;?>" id="water_table_fluctuation_max<?php echo $i;?>" size="20" class="txt6" onBlur="float(this)"></td>
					    <td width="50" align="center"><input type="text" name="para_ph<?php echo $i;?>" id="para_ph<?php echo $i;?>" size="20" class="txt6" ></td>
					    <td width="50" align="center"><input type="text" name="para_tds<?php echo $i;?>" id="para_tds<?php echo $i;?>" size="20" class="txt6" ></td>
					    <td width="50" align="center"><input type="text" name="para_f<?php echo $i;?>" id="para_f<?php echo $i;?>" size="20" class="txt6" ></td>
					    <td width="50" align="center"><input type="text" name="para_cl<?php echo $i;?>" id="para_cl<?php echo $i;?>" size="20" class="txt6" ></td>
						<td width="50" align="center"><input type="text" name="para_no3<?php echo $i;?>" id="para_no3<?php echo $i;?>" size="20" class="txt6" ></td>
						<td width="50" align="center"><input type="text" name="testing_date<?php echo $i;?>" id="testing_date<?php echo $i;?>" size="20" class="txt6" ></td>
						<td width="35" align="center"><font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Date</font></td>
						</tr></table></div></td>
			  	  <tr>
					  		<td colspan="14"><div id="nf<?php echo $i;?>" class="hideme" align="center">
							<table border="0" width="15%" id="table16" cellpadding="0">
							<tr>
								<td colspan="3" align="center" bgcolor="#CCCCCC">
									<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Repairable Status</font>								</td>
								<td width="109" rowspan="2" align="center" bgcolor="#CCCCCC"> 
									<font style="font-size: 8.5pt; font-style:normal" face="Verdana" color="#990000">Remarks (State means to repair &amp; rejuvenate)</font></td>
							  <tr>
									<td align="center" width="61" bgcolor="#CCCCCC">
									<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Repairable</font></td>
								<td align="center" width="61" bgcolor="#CCCCCC">
									<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Non Repairable</font>					  			</td>
								<td align="center" width="64" bgcolor="#CCCCCC">
									<font style="font-size: 8.5pt; font-style: normal" face="Verdana" color="#990000">Abandoned</font></td>
							  </tr>
							<tr>
								<td align="center" width="61" bgcolor="#CCCCCC">
									<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  			  <input type="radio" name="repairable_status<?php echo $i;?>" id="repairable_status<?php echo $i;?>" value="Repairable"></font>				  			  </td>
								<td align="center" width="61" bgcolor="#CCCCCC">
									<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  			  <input type="radio" name="repairable_status<?php echo $i;?>" id="repairable_status<?php echo $i;?>" value="Non Repairable"></font>				  			  </td>
								<td align="center" width="64" bgcolor="#CCCCCC">
									<font style="font-size: 8.5pt" face="Arial" color="#000000">
		  			  			  <input type="radio" name="repairable_status<?php echo $i;?>" id="repairable_status<?php echo $i;?>" value="Abondoned"></font>				  			  </td>
								<td width="109" align="center" bgcolor="#CCCCCC">
		       		  				<input type="text" name="remarks<?php echo $i;?>" id="remarks<?php echo $i;?>" size="40" style="font-size: 8pt; font-family: Verdana" class="txt5">							  </td>
							</tr>
							</table>
							</div></td>
		  		  </tr>
					<?php 
					$i++;
					 } 
					}
					///end of sp code
					
				}	
					?>
					<input type="hidden" name="loccount" id="loccount" value="<?php echo $i;?>">
			  </table>			</td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>
				<font style="font-size: 8.5pt" face="Arial" color="#000000">
			    &nbsp;&nbsp;Legends:</font><ul type="DISC">
				<li><font style="font-size: 8.5pt" face="Arial" color="#000000">
				Functional status:&nbsp; &nbsp;&nbsp;F - Functional, NF - Not Functional</font></li>
				<li><font style="font-size: 8.5pt" face="Arial" color="#000000">
				Operational Status:&nbsp; &nbsp;IU - In Use, OU - Out of Use</font></li>
				<li><font style="font-size: 8.5pt" face="Arial" color="#000000">
				Quality Status:&nbsp;&nbsp;P - Potable, NP - Not Potable</font></li>
				<li><font style="font-size: 8.5pt" face="Arial" color="#000000">
				Yield: &nbsp;&nbsp;&nbsp;G - Good, S - Satisfactory, P-Poor</font></li>
				<li><font style="font-size: 8.5pt" face="Arial" color="#000000">
				Seasonal Fluctuations: &nbsp;N - No Change, S - Slight Change, D - Drastic Change</font></li></ul>			</td>
		</tr>
		<tr>
			<td><p align="center">
				<input type="submit" value="Click for Continue" name="submit"></td>
		</tr>
		<tr>
			<td>&nbsp;</td>
		</tr>
		<tr>
			<td>			</td>
		</tr>
	</table>
</form>
</div>


</body>
</html>